<?php

class User_Form_Admincp_Signup_Step extends Nuo_Form
{
	function init()
	{
		$this -> setTitle('Signup Step Setting');

		$this -> addChild('radio', 'mode', array(
			'Label' => 'Signup Steps',
			'multiOptions' => array(
				'none' => 'Use expression signup mode',
				'require' => 'Users must complete all steps to completed registration',
			),
		));

		$this -> addChild('select', 'autoLevelId', array(
			'label' => 'Default Level ID',
			'multiOptions' => Nuo::getTable('permission/role') -> getMultiOptions()
		));

		$this -> addChild('radio', 'displayname', array(
			'label' => 'Display Name',
			'multiOptions' => array(
				'0' => 'Hide this field',
				'1' => 'Allow user input full name',
				'2' => 'User input first name and last name',
				'3' => 'User input first name, last name and middle name',
			),
			'value' => 1,
		));

		$this -> addChild('radio', 'autoPassword', array(
			'label' => 'Password',
			'multiOptions' => array(
				'1' => 'System generate password then send to user via email!',
				'0' => 'User input password',
			),
			'value' => 1,
		));

		$this -> addChild('radio', 'autoUsername', array(
			'label' => 'Username ?',
			'multiOptions' => array(
				'0' => 'Allow users choose their username',
				'1' => 'Users could not set their username at registration time'
			)
		));

		$this -> addChild('radio', 'autoGender', array(
			'label' => 'Gender ?',
			'multiOptions' => array(
				'0' => 'Allow users choose their gender',
				'1' => 'Users could not set thier gender at registration time'
			)
		));

		$this -> addChild('radio', 'autoLocale', array(
			'label' => 'Locale ?',
			'multiOptions' => array(
				'0' => 'Allow users set their locale at register time',
				'1' => 'Users could not set thier locale at registration time'
			)
		));

		$this -> addChild('radio', 'autoLanguage', array(
			'label' => 'Language ?',
			'multiOptions' => array(
				'0' => 'Allow users set their language at register time',
				'1' => 'Users could not set thier language at registration time'
			)
		));

		$this -> addChild('radio', 'autodesc.Timezone', array(
			'label' => 'form-desc.Timezone ?',
			'multiOptions' => array(
				'0' => 'Allow users set their desc.Timezone at register time',
				'1' => 'Users could not set thier desc.Timezone at registration time'
			)
		));

		$this -> addChild('radio', 'autoVerify', array(
			'label' => 'Verify ?',
			'multiOptions' => array(
				'1' => 'Does not to verify their email',
				'0' => 'Verify theirs before using'
			)
		));

		$this -> addChild('radio', 'autoApprove', array(
			'label' => 'Approve ?',
			'multiOptions' => array(
				'1' => 'Users will be approved automatically',
				'0' => 'Admin will approve users registration manually'
			)
		));

		$this -> addChild('radio', 'autoEnable', array(
			'label' => 'Enable ?',
			'multiOptions' => array(
				'1' => 'After approval, users will be enabled automatically',
				'0' => 'Admin will enable users manually'
			)
		));

		$this -> addChild('radio', 'autoLogin', array(
			'label' => 'Login ?',
			'multiOptions' => array(
				'1' => 'After user complete their registration process, automatic login if user is enabled',
				'0' => 'No, user must login by their self'
			)
		));

		$this -> addChild('radio', 'avatar', array(
			'label' => 'Avatar ?',
			'multiOptions' => array(
				'0' => 'No, does not allow upload avatar photo',
				'1' => 'Required, users must upload avatar',
				'2' => 'Optional, users may upload avatar',
			)
		));

		$this -> addChild('yesno', 'useCaptcha', array('label' => 'Use captcha to prevent spamer', ));

		$this -> addChild('group', '_footer');

		$this -> _footer -> addChild('submit', '_submit') -> addChild('cancel', '_cancel');

	}

}
